/********************************************************************
	created:	2012/03/26
	filename: 	Dx9FxMaterialWrapper.h
	author:		Mwolf
	
	purpose:	
*********************************************************************/
#ifndef Dx9FxMaterialWrapper_h__
#define Dx9FxMaterialWrapper_h__

#include <vcclr.h>

#include "../DX9SharedLayer/Dx9FxMaterial.h"


namespace DX9ToolManaged
{
	public ref class Dx9FxMaterialWrapper
	{
	public:
		Dx9FxMaterialWrapper();
		~Dx9FxMaterialWrapper();

		bool LoadEffectFromFile(System::String^ filename);
		void UnloadEffect();

		void UpdateNonSharedMatrices();

		bool IsAvailable();

		UINT	Begin();
		void	End();

		void	BeginPass( UINT Pass );
		void	EndPass();

	protected:
		Dx9FXMaterial*	m_Impl;
	};

	public ref class Dx9FxManager
	{
	private:
		static Dx9FxManager instance;
		Dx9FxManager() {}

	public:
		static property Dx9FxManager^ Instance { Dx9FxManager^ get() { return %instance; } }

		System::String^ GetLastErrorString();
		void UpdateSharedMatrices();
	};

}

#endif // Dx9FxMaterialWrapper_h__
